<!DOCTYPE html>
<html>
<head>
	<title>HTML KickStart</title>
	<meta charset="UTF-8">
	<meta name="description" content=""/>
	<script type="text/javascript"
	        src="<?= $sTpl ?>https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
	<!--[if lt IE 9]>
	<script src="<?= $sTpl ?>http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
	<script type="text/javascript" src="<?= $sTpl ?>js/prettify.js"></script>
	<!-- PRETTIFY -->
	<script type="text/javascript" src="<?= $sTpl ?>js/kickstart.js"></script>
	<!-- KICKSTART -->
	<link rel="stylesheet" type="text/css" href="<?= $sTpl ?>css/kickstart.css" media="all"/>
	<!-- KICKSTART -->
	<link rel="stylesheet" type="text/css" href="<?= $sTpl ?>style.css" media="all"/>
	<!-- CUSTOM STYLES -->
</head>
<body><a id="top-of-page"></a>

<div id="wrap" class="clearfix">
	<!-- ===================================== END HEADER ===================================== -->


	<!-- 
	
		ADD YOU HTML ELEMENTS HERE
		
		Example: 2 Columns
	 -->
	<!-- Menu Horizontal -->

	<div class="col_12">

		<div class="block">

			<h2 align="center">Сокращалка URL</h2>
			<label class="col_12">Последние сокращенные URL</label>
			<br></br>
			<!-- Table sortable -->
			<table class="striped">
				<thead>
				<tr>
					<th>Длинный</th>
					<th>Короткий</th>
					<th>Клики</th>
				</tr>
				</thead>
				<tbody>
				<? foreach ($aUrls as $u): ?>
				<tr>
					<td><?= $u['url_long']?></td>
					<? $short = 'http://'.$_SERVER['HTTP_HOST'].'/'.$u['url_short'] ?>
					<td><a href="<?=$short?>"><?= $short?></a></td>
					<td></td>
				</tr>
				<? endforeach ?>
				</tbody>
			</table>
			<br> </br>
			<div class="link" align="center"><a href="index.php">Сократить ещё один url</a></div>
		</div>
	</div>

	<!-- ===================================== START FOOTER ===================================== -->
	<div class="clear"></div>

</div>
<!-- END WRAP -->
</body>
</html>